#!/bin/bash

# Exit on error
set -e

# Change to the build directory
cd build

# Define default test parameters
O_PATH="../TMP-COMBINE"
N_PATH="../TMP-NAV"
CONFIG_PATH="./全_伪距.conf"
ORDER="8"
START_YEAR="2024"
START_MONTH="12"
START_DAY="29"
START_HOUR="0"
START_MINUTE="0"
START_SECOND="0"
END_YEAR="2024"
END_MONTH="12"
END_DAY="29"
END_HOUR="23"
END_MINUTE="59"
END_SECOND="59"

# Run the basic test with all required parameters
echo "=== Running basic test with required parameters ==="
./dcb \
    $O_PATH \
    $N_PATH \
    $CONFIG_PATH \
    $ORDER \
    $START_YEAR \
    $START_MONTH \
    $START_DAY \
    $START_HOUR \
    $START_MINUTE \
    $START_SECOND \
    $END_YEAR \
    $END_MONTH \
    $END_DAY \
    $END_HOUR \
    $END_MINUTE \
    $END_SECOND

# Add more test cases if needed
# For example:
# echo "=== Running test with custom output file ==="
# ./dcb @全_伪距.conf -o custom_output.txt

# Run all CTest tests
echo "=== Running all CTest tests ==="
ctest -V 